#include <REGX52.H>
#include "uart.c"
#include "lcd12864.c"
/**
 * 分别实现横向和竖向间隔的条纹
 * 横条：4个黑色条纹4个白色条纹
 * 竖条：32个黑色条纹32个白色条纹
 */
unsigned char page, col, is_black_stripe, stripe_width;

void main()
{
    uart_init();
    lcd_init();
    lcd_clean_screen();
    // 横向
    /*
    lcd_display_same_bytes_in_page(0, 0, 0xFF, 128);
    lcd_display_same_bytes_in_page(2, 0, 0xFF, 128);
    lcd_display_same_bytes_in_page(4, 0, 0xFF, 128);
    lcd_display_same_bytes_in_page(6, 0, 0xFF, 128);
    */

    // 竖向
    /*
    for (col = 0; col < 128; col += 4)
    {
        for (page = 0; page < 8; page++)
        {
            lcd_display_same_bytes_in_page(page, col, 0xFF, 2);
        }
    }
    */
    // 棋盘格
    // 横线
    for (page = 0; page < 7; page += 2)
    {
        lcd_display_same_bytes_in_page(page, 0, 0xFF, 128);
    }
    // 竖线
    for (col = 0; col < 128; col += 16)
    {
        for (page = 0; page < 8; page++)
        {
            lcd_display_same_bytes_in_page(page, col, 0xFF, 8);
        }
    }

    while (1)
    {
    }
}
